/*
 * @Author: namelll 2677065112@qq.com
 * @Date: 2023-05-31 14:41:09
 * @LastEditors: namelll 2677065112@qq.com
 * @LastEditTime: 2023-06-05 15:27:32
 * @FilePath: \vue3-ts-project\src\main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createApp } from 'vue'
import App from '@/APP.vue'

//引入element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

//引入中文
//@ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

//导入svg需要的配置
import 'virtual:svg-icons-register'

//引入自定义插件对象：注册整个项目全局组件
import globalComponent from '@/components/index.ts'

//引入全局模板样式
import '@/styles/index.scss'

//引入路由
import router from './router'

//引入pinia大仓库
import pinia from './store'

//引入路由鉴权
import './permisstion'

//登录测试
// import axios from 'axios'
// axios({
//   url: '/api/user/login',
//   method: 'post',
//   data: {
//     username: 'admin',
//     password: '111111'
//   }
// })

import vue3videoPlay from 'vue3-video-play' // 引入组件
import 'vue3-video-play/dist/style.css' // 引入css

//获取应用实例对象
const app = createApp(App)

//使用中文
app.use(ElementPlus, {
  locale: zhCn,
})

app.use(vue3videoPlay)

//安装自定义插件,app.use会执行install方法
app.use(globalComponent)

app.use(router)
app.use(pinia)

//挂载
app.mount('#app')

//通过import.meta.env获取环境变量
// console.log(import.meta.env)



